package com.rs.model.rs;

import java.io.Serializable;
import java.util.Date;

import com.rs.util.TimeTypeConversionUtil;

import io.swagger.annotations.ApiModelProperty;

/**
 * 用户
 * @author HuJie
 *
 */
public class User implements Serializable {
	@ApiModelProperty(value = "用户id，不传")
	private Integer u_id;//用户ID

	@ApiModelProperty(value = "账号,不传")
	private String u_username;//账号

	@ApiModelProperty(value = "密码")
	private String u_password;//密码

	@ApiModelProperty(value = "姓名")
	private String u_name;//姓名

	@ApiModelProperty(value = "性别")
	private String u_sex;//性别

	@ApiModelProperty(value = "身份证号")
	private String u_idcard;//身份证号

	@ApiModelProperty(value = "年龄")
	private Integer u_age;//年龄

	@ApiModelProperty(value = "出生日期")
	private Date u_birthday;//出生日期

	@ApiModelProperty(value = "手机号码")
	private String u_phone;//手机号码

	@ApiModelProperty(value = "电子邮件")
	private String u_email;//电子邮件

	@ApiModelProperty(value = "银行卡号")
	private String u_bankNumber;//银行卡号

	@ApiModelProperty(value = "头像")
	private String u_head;//头像

	@ApiModelProperty(value = "头像的Base64编码")
	private String u_headBase64;//头像的Base64

	@ApiModelProperty(value = "头像的后缀名")
	private String u_headType;//头像的后缀名

	@ApiModelProperty(value = "现住址")
	private String u_address;//现住址

	@ApiModelProperty(value = "入职时间")
	private Date u_entryTime;//入职时间

	@ApiModelProperty(value = "就职状态0:实习 1：入职 2：离职")
	private Integer u_type;//就职状态0:实习 1：入职 2：离职

	@ApiModelProperty(value = "离职时间")
	private Date u_quitTime;//离职时间

	@ApiModelProperty(value = "部门ID")
	private Integer u_deid;//部门ID

	@ApiModelProperty(value = "部门名称")
	private String u_dename;//部门名称

	@ApiModelProperty(value = "职务ID")
	private Integer u_poid;//职务ID

	@ApiModelProperty(value = "职务名称")
	private String u_poname;//职务名称

	@ApiModelProperty(value = "审核状态0:待审核 1：通过 2：不通过")
	private Integer u_examine;//审核状态0:待审核 1：通过 2：不通过

	@ApiModelProperty(value = "审核人")
	private Integer u_uid;//审核人

	@ApiModelProperty(value = "审核人名称")
	private String u_uname;//审核人名称

	@ApiModelProperty(value = "用户的职位权限")
	private Integer u_rank;//用户的职位权限

	@ApiModelProperty(value = "当前页")
	private Integer pageNum;//当前页

	private static final long serialVersionUID = 1L;

	//将user转为数组
	public Object[] toObjects() {
		Object[] ary = new Object[9];

		ary[0] = u_id;

		ary[1] = u_name;

		ary[2] = u_sex;

		ary[3] = u_dename;

		ary[4] = u_poname;

		if (u_type != null) {
			switch (u_type) {
			case 0:
				ary[5] = "实习";
				break;
			case 1:
				ary[5] = "入职";
				break;
			case 2:
				ary[5] = "离职";
				break;
			}
		}
		ary[6] = TimeTypeConversionUtil.getStringDate(u_entryTime);
		if (u_examine != null) {
			switch (u_examine) {
			case 0:
				ary[7] = "未审核";
				break;
			case 1:
				ary[7] = "通过";
				break;
			case 2:
				ary[7] = "驳回";
				break;
			}
		}
		ary[8] = "查看";

		return ary;
	}

	public Integer getU_id() {
		return u_id;
	}

	public void setU_id(Integer u_id) {
		this.u_id = u_id;
	}

	public String getU_username() {
		return u_username;
	}

	public void setU_username(String u_username) {
		this.u_username = u_username;
	}

	public String getU_password() {
		return u_password;
	}

	public void setU_password(String u_password) {
		this.u_password = u_password;
	}

	public String getU_name() {
		return u_name;
	}

	public void setU_name(String u_name) {
		this.u_name = u_name;
	}

	public String getU_sex() {
		return u_sex;
	}

	public void setU_sex(String u_sex) {
		this.u_sex = u_sex;
	}

	public String getU_idcard() {
		return u_idcard;
	}

	public void setU_idcard(String u_idcard) {
		this.u_idcard = u_idcard;
	}

	public Integer getU_age() {
		return u_age;
	}

	public void setU_age(Integer u_age) {
		this.u_age = u_age;
	}

	public Date getU_birthday() {
		return u_birthday;
	}

	public void setU_birthday(Date u_birthday) {
		this.u_birthday = u_birthday;
	}

	public String getU_phone() {
		return u_phone;
	}

	public void setU_phone(String u_phone) {
		this.u_phone = u_phone;
	}

	public String getU_email() {
		return u_email;
	}

	public void setU_email(String u_email) {
		this.u_email = u_email;
	}

	public String getU_bankNumber() {
		return u_bankNumber;
	}

	public void setU_bankNumber(String u_bankNumber) {
		this.u_bankNumber = u_bankNumber;
	}

	public String getU_head() {
		return u_head;
	}

	public void setU_head(String u_head) {
		this.u_head = u_head;
	}

	public String getU_headBase64() {
		return u_headBase64;
	}

	public void setU_headBase64(String u_headBase64) {
		this.u_headBase64 = u_headBase64;
	}

	public String getU_address() {
		return u_address;
	}

	public void setU_address(String u_address) {
		this.u_address = u_address;
	}

	public Date getU_entryTime() {
		return u_entryTime;
	}

	public void setU_entryTime(Date u_entryTime) {
		this.u_entryTime = u_entryTime;
	}

	public Integer getU_type() {
		return u_type;
	}

	public void setU_type(Integer u_type) {
		this.u_type = u_type;
	}

	public Date getU_quitTime() {
		return u_quitTime;
	}

	public void setU_quitTime(Date u_quitTime) {
		this.u_quitTime = u_quitTime;
	}

	public Integer getU_deid() {
		return u_deid;
	}

	public void setU_deid(Integer u_deid) {
		this.u_deid = u_deid;
	}

	public Integer getU_poid() {
		return u_poid;
	}

	public void setU_poid(Integer u_poid) {
		this.u_poid = u_poid;
	}

	public Integer getU_examine() {
		return u_examine;
	}

	public void setU_examine(Integer u_examine) {
		this.u_examine = u_examine;
	}

	public Integer getU_uid() {
		return u_uid;
	}

	public void setU_uid(Integer u_uid) {
		this.u_uid = u_uid;
	}

	public String getU_dename() {
		return u_dename;
	}

	public void setU_dename(String u_dename) {
		this.u_dename = u_dename;
	}

	public String getU_poname() {
		return u_poname;
	}

	public void setU_poname(String u_poname) {
		this.u_poname = u_poname;
	}

	public String getU_uname() {
		return u_uname;
	}

	public void setU_uname(String u_uname) {
		this.u_uname = u_uname;
	}

	public Integer getU_rank() {
		return u_rank;
	}

	public void setU_rank(Integer u_rank) {
		this.u_rank = u_rank;
	}

	public String getU_headType() {
		return u_headType;
	}

	public void setU_headType(String u_headType) {
		this.u_headType = u_headType;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	@Override
	public String toString() {
		return "User [u_id=" + u_id + ", u_username=" + u_username + ", u_password=" + u_password + ", u_name=" + u_name
				+ ", u_sex=" + u_sex + ", u_idcard=" + u_idcard + ", u_age=" + u_age + ", u_birthday=" + u_birthday
				+ ", u_phone=" + u_phone + ", u_email=" + u_email + ", u_bankNumber=" + u_bankNumber + ", u_head="
				+ u_head + ", u_headBase64=" + u_headBase64 + ", u_headType=" + u_headType + ", u_address=" + u_address
				+ ", u_entryTime=" + u_entryTime + ", u_type=" + u_type + ", u_quitTime=" + u_quitTime + ", u_deid="
				+ u_deid + ", u_dename=" + u_dename + ", u_poid=" + u_poid + ", u_poname=" + u_poname + ", u_examine="
				+ u_examine + ", u_uid=" + u_uid + ", u_uname=" + u_uname + ", u_rank=" + u_rank + ", pageNum="
				+ pageNum + "]";
	}

}